FROM java:8-jre-alpine
ADD *.jar /home/micro-gateway.jar
ENV JAVA_OPTS_DEF="-server -Djava.net.preferIPv4Stack=true"
ENV JAVA_OPTS="-Xmx2g -Xms2g"
ENV APP_ARGS=""
#定义时区参数
ENV TZ=Asia/Shanghai
#设置时区
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
#设置编码
ENV LANG C.UTF-8
ENTRYPOINT java ${JAVA_OPTS_DEF} ${JAVA_OPTS} ${APP_ARGS} -Djava.security.egd=file:/dev/./urandom -Dreactor.netty.pool.leasingStrategy=lifo -jar /home/micro-gateway.jar